package spring.cloud.sleuth.service.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SampleController {
    private static final Log LOG = LogFactory.getLog(SampleController.class);

    @RequestMapping(value = "/service", method = {RequestMethod.GET})
    public String service() throws Exception {
        String serviceName = "Sleuth Service";
        LOG.info(serviceName);
        Thread.sleep(100L);
        return serviceName;
    }
}